<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 华哥
  Date: 2021/5/11
  Time: 14:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>湖南省长沙市华子医院</title>
    <%
        //获取项目的根路径
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>

    <style type="text/css">

        * {
            margin: 0;
        }

        .head {
            width: 100%;
            background: url("<%=basePath%>static/img/doctorLogin/bjtp.jpg") no-repeat;
            background-size: 100% 100%;

        }

        .body {
            width: 100%;
            background: url("<%=basePath%>static/img/doctorLogin/bodybjt.jpg") no-repeat;
            height: 600px;
            background-size: 100% 100%;
            opacity: 0.5;
        }

        .head span {
            font-size: 40px;
            color: whitesmoke;
        }

        .head span, img {
            vertical-align: middle;
        }

        .biao-body {
            width: 500px;
            background: white;
            height: 300px;
            margin: 50px auto auto;
            border: 5px solid #9F9F9F;
            padding-top: 50px;

        }

        #biao {
            font-size: 20px;
        }

        .text {
            width: 200px;
            height: 30px;
        }

        h1 {
            position: relative;
            top: 50px;
            text-align: center;
            color: #2D93CA;
            font-size: 50px;
        }

        #yz, #yz2 {
            font-size: 12px;
        }

        form {
            margin-left: 100px;
        }

        #anniu {
            width: 200px;
            height: 50px;
            font-size: 20px;
            margin-left: 50px;
            border-radius: 10px 10px 10px 10px;
            background: #2D93CA;
            color: white;
        }

        ul li span {
            color: #9F9F9F;
            font-family: "微软雅黑", serif;
            font-size: 13px;
        }

        ul li h3 {
            margin-bottom: 0;
            margin-top: 20px;
        }

        ul {
            margin-top: 50px;
            margin-left: 80px;
        }

        ul img {
            margin-left: 20px;
            margin-right: 20px;
        }

        ul li {
            list-style: none;
            float: left;
            margin-left: 5px;
        }
    </style>
</head>
<body>
<div class="head">
    <img src="<%=basePath%>static/img/doctorLogin/logo.png" height="150px"><span> · 湖南省长沙省华子医院 | 找回密码</span>
</div>
<div class="body">
    <h1><img src="<%=basePath%>static/img/doctorLogin/yz.png" height="60px" width="60px"> 验证信息</h1><br>

    <div class="biao-body">
        <form action="<%=basePath%>doctorLogin/updPwd" method="post" id="biao">
            <p>用 户 名 ：<input type="text" name="doctorId" class="text" placeholder="用户名" id="id"></p><br>
            <p>身 份 证 ：<input type="text" name="idCard" class="text" placeholder="身份证" id="idCard">
                <span id="yz"></span>
            </p>
            <br>
            <p>新 密 码 ：<input type="password" name="pwd" class="text" placeholder="密码" id="pwd2"></p><br>
            <p>确认密码：<input type="password" name="pwd2" class="text" placeholder="新密码" id="pwd">
                <span id="yz2"></span>
            </p><br>
            <p><input type="submit" value="确定修改" id="anniu"></p>
        </form>
    </div>

</div>
<ul>
    <li><img src="<%=basePath%>static/img/doctorLogin/hg.png" width="80px" height="80px"></li>
    <li class="yang">
        <h3>专业的平台</h3>
        <span>三甲医院号源直供、服务挂号上亿人次</span>
    </li>
    <li><img src="<%=basePath%>static/img/doctorLogin/ys.png" width="70px" height="70px"></li>
    <li class="yang">
        <h3>知名医生</h3>
        <span>知名医疗资源、精诚解决您的疑难杂症</span>
    </li>
    <li><img src="<%=basePath%>static/img/doctorLogin/xx.png" width="70px" height="70px"></li>
    <li class="yang">
        <h3>权威的问诊</h3>
        <span>多样化问诊模式、快速精准解答问题</span>
    </li>
    <li><img src="<%=basePath%>static/img/doctorLogin/jk.png" width="70px" height="70px"></li>
    <li class="yang">
        <h3>全面健康医院</h3>
        <span>要么不来、要么活着回去~华子医院</span>
    </li>
</ul>

<script type="text/javascript" src="<%=basePath%>static/jquery/jquery-1.12.4.js"></script>

<script type="text/javascript">

    $(function () {
        $("#idCard").blur(function () {

            let doctorId = $("#id").val();
            let idCard = $("#idCard").val();

            $.ajax(
                {
                    url: "<%=basePath%>doctorLogin/selIdCard",
                    data: {
                        doctorId: doctorId,
                        idCard: idCard,
                    },
                    type: "post",
                    dataType: "json",
                    success: function (data) {
                        if (data) {
                            $("#yz").text("验证成功").css("color", "green");
                        } else {
                            $("#yz").text("验证失败").css("color", "red");
                        }
                    }
                });
        })

        $("#pwd").blur(function () {
            let pwd = $("#pwd2").val();
            let pwd2 = $("#pwd").val();
            if (pwd == pwd2) {
                $("#yz2").text("");
            } else {
                $("#yz2").text("两次密码不一样").css("color", "red");
            }
        })

    })
</script>
</body>
</html>